package com.tianji.learning.mapper;

import com.tianji.learning.entity.PointsRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 学习积分记录，每个月底清零 Mapper 接口
 * </p>
 *
 * @author xjs
 */
public interface PointsRecordMapper extends BaseMapper<PointsRecord> {

    int sumTodayPointsByUserAndType(Long userId, Integer type, LocalDateTime dayStartTime, LocalDateTime dayEndTime);

    List<PointsRecord> todayStatistics(Long userId, LocalDateTime dayStartTime, LocalDateTime dayEndTime);
}
